﻿using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;

namespace Tests
{
    public class TestCode
    {
        // A Test behaves as an ordinary method
        [Test]
        public void TestCodeSimplePasses()
        {
            decimal num = 1;
           string res=  ConverNumber.ConverNumber2Str(num);
            decimal changeNum = ConverNumber.StrConver2Number(res);
            Debug.Log("res :" + res + " :" + (num == changeNum));
            Assert.AreEqual(num, changeNum, "不相同");

           string mixS=  ConverNumber.MixNumberString(res, 6, -100);
            string recoverS = ConverNumber.RestoreNumberString(mixS, -100);
            Debug.Log("mixS :" + mixS + "  recoverS: " + recoverS);
            // Use the Assert class to test conditions

            changeNum = ConverNumber.StrConver2Number(recoverS);
            Debug.Log("res :" + res + " :" + (num == changeNum));
        }

        // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
        // `yield return null;` to skip a frame.
        [UnityTest]
        public IEnumerator TestCodeWithEnumeratorPasses()
        {
            // Use the Assert class to test conditions.
            // Use yield to skip a frame.
            yield return null;
        }
    }
}
